function norm_phi = norm_features(phi)
    s = sum(phi);
    norm_phi = arrayfun(@(x) x/s, phi);
end